<script setup lang="ts">
import { onMounted, ref } from "vue";

// 声明 props 类型
export interface groupFormProps {
  formInline: {
    name: string;
  };
}

const props = withDefaults(defineProps<groupFormProps>(), {
  formInline: () => ({
    name: ""
  })
});

const newFormInline = ref(props.formInline);
onMounted(() => {
  newFormInline.value.name = "";
});
</script>

<template>
  <el-form :model="newFormInline" class="add_form">
    <el-form-item label="组名称" prop="name">
      <el-input
        v-model="newFormInline.name"
        class="!w-[220px]"
        placeholder="请输入分组名称"
      />
    </el-form-item>
  </el-form>
</template>
<style lang="scss" scoped>
.add_form :deep(.el-form-item__label) {
  width: 130px !important;
}
</style>
